﻿using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using zhangmenren.Db;
using zhangmenren.Models;

namespace zhangmenren.IService
{
    public interface IUserService: IDependency
    {
        Task<int> Add(UserEntity user);
        Task<int> AddWeiXin(UserEntity user);

        /// <summary>
        /// 查询作品作者，带掌门号的用户
        /// </summary>
        /// <returns></returns>
        Task<IEnumerable<UserEntity>> Find();

        Task<UserEntity> Find(string username);

        Task<UserEntity> FindMobile(string mobile);

		Task<UserEntity> FindById(int id);
        Task<UserEntity> FindByZMRID(int zmrid);


        Task<UserEntity> FindOpenId(string openId);

        Task<UserEntity> FindqqId(string qqId);


        Task<IEnumerable<UserEntity>> Selelct(int page = 1, int lim = 50, string key = "");

        Task<int> SetZMRID(int zmrid, int id);

        /// <summary>
        /// 更新新掌门人
        /// </summary>
        /// <returns>The tui jian.</returns>
        /// <param name="zmrid">Zmrid.</param>
        /// <param name="id">Identifier.</param>
        Task<int> SetTuiJian(int id, DateTime date);
        Task<UserEntity> SelectTuiJia();
        #region 修改个人信息使用

        Task<int> SetHead(string Head, int id);
		Task<int> SetPwd(string pwd, int id);
		Task<int> SetPwd(string pwd, string mobile);
		Task<int> SetMobile(string Head, int id);
		Task<int> SetMaoShu(string MaoShu, int id);
        Task<int> SetJianJie(string jianjie, int id);
        Task<int> SetUserName(string UserName, int id);
		Task<int> SetAddress(string address, int id);
		#endregion
	}
}
